const Router = require("koa-router");
const { orderController } = require("./order.controller");
const router = new Router({ prefix: "/order" });
const { ApiDescribe } = require('@/logger/api-logger.middleware');

// 创建零售订单
router.post("/retail", ApiDescribe('创建零售订单'), orderController.createRetailOrder);
// 创建桌台订单
router.post("/table", ApiDescribe('创建桌台订单'), orderController.createTableOrder);
// 添加物品
router.post("/product/:order_id", ApiDescribe('桌台添加商品'), orderController.createTableOrderProduct);
// 订单结算
router.post("/payment/:order_id", ApiDescribe('桌台结算'), orderController.paymentTableOrder);


module.exports = router;
